﻿@inject MasaBlazor MasaBlazor

<MRadioGroup @bind-Value="theme" @bind-Value:after="OnChange">
    <MRadio Value="@("light")" Label="Light"></MRadio>
    <MRadio Value="@("dark")" Label="Dark"></MRadio>
    <MRadio Value="@("greenery")" Label="Greenery"></MRadio>
    <MRadio Value="@("camel")" Label="Camel"></MRadio>
</MRadioGroup>

@code {

    string theme;

    protected override void OnInitialized()
    {
        base.OnInitialized();
        
        theme = MasaBlazor.Theme.DefaultTheme;
    }

    private void OnChange()
    {
        MasaBlazor.SetTheme(theme);
    }

}
